﻿namespace SPFluid.Core.Validation.Extensions
{
    public static class ClassValidatorExtensions
    {
        public static IGuard<T> IsNotNull<T>(this IGuard<T> guard)
            where T : class
        {
            if (guard.Argument.Value == null)
            {
                guard.ExceptionHandler.ThrowArgumentNullException();
            }

            return guard;
        }
    }
}